package com.huike.clues.mapper;

import com.huike.clues.domain.TbClue;
import com.huike.clues.domain.TbClueTrackRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;




@Mapper
public interface TbClueMapper {
    void updateByCondition(TbClue clue);

    void insert(TbClue tbClue);

    void update(TbClue tbClue);

    TbClue getById1(Long id);

    void deleteById(Long id);


    void updateStatus(@Param("id") Long id, @Param("status") String status);

    List<TbClue> selectClueList(TbClue clue);

    List<TbClue> selectCluePoll(TbClue clue);



    /**
     * 根据id获取线索基础信息 回显
     * @param id
     * @return TbClue
     */
    TbClue findClueById(Long id);

    /**
     * 根据渠道活动 统计数量个数
     * @param tbClue
     * @return
     */
    Map<String, Object> countByActivity(TbClue tbClue);

    /**
     * 线索统计明细列表 分页查询
     * @param tbClue
     * @return
     */
    List<TbClue> cluesStatisticsList(TbClue tbClue);
    void updateTransfer(@Param("id") Long id, @Param("status") String status);

    List<TbClueTrackRecord> list(Long clueId);

    TbClueTrackRecord getById(Long id);

    void insertClueTrackRecord(TbClueTrackRecord tbClueTrackRecord);

}
